<!--
 * @Author: your name
 * @Date: 2021-03-31 22:14:39
 * @LastEditTime: 2021-04-30 02:37:09
 * @LastEditors: Please set LastEditors
 * @Description: PDF预览区域
 * @FilePath: /medicine-web/src/components/PdfView/index.vue
-->
<template>
  <div class="pdf-view-container">
    <iframe :src="this.$uploadUrl + url" frameborder="0" style="width: 100%; height: 100%" v-if="url && getCookie('uid')"></iframe>
    <span v-if="!url && getCookie('uid')">暂无pdf文档</span>
    <span v-if="!getCookie('uid')">登录后可预览</span>
  </div>
</template>
<script>
export default {
  name: 'pdfView',
  props: {
    url: {
      type: String,
      default: ''
    }
  }
}
</script>
<style lang="scss" scoped>
@import '~@/assets/styles/flex.scss';
.pdf-view-container {
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  font-size: 74px;
  font-weight: bold;
  @include flex-def;
  @include flex-zCenter;
  @include flex-cCenter;
}
</style>